﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="hrChartReportQueryParams.aspx.cs" Inherits="ZX.Web.UI.Controls.ChartReportQueryParams" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../Styles/default/calendar.css" />
    <link href="../../Scripts/Jquery/datetimepicker/jquery-ui.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.calendar.js" type="text/javascript"></script>
    <script src="../../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../../Scripts/Public.js" type="text/javascript"></script>
    <script type="text/javascript">

        var functionId = getPar1("functionID");
        $(document).ready(function () {            
            RunQuery();
        });

        function SetFrmHeight() {
            var clientHeight = parent.document.body.clientHeight;
            var queryBodyHeight = document.getElementById("div").offsetHeight;
            var frameWin = document.getElementById("ReportView");
            frameWin.style.height = (clientHeight - queryBodyHeight - 100) + "px";
        }

        function fnQuery(id) {
            RunQuery();
        }

        function RunQuery() {
            var url = "ChartReportView.aspx?functionID=" + functionId;
            $("input").each(function () {
                var attr = $(this).attr("id");
                var value = $(this).val();
                url += "&" + attr + "=" + value;
            });
            $("select").each(function () {
                var attr = $(this).attr("id");
                var value = $(this).val();
                url += "&" + attr + "=" + value;
            });
            document.getElementById("ReportView").src = encodeURI(url);
            SetFrmHeight();
        }
    </script>
    <style type="text/css">
      button
      {
          width:55px;
          height:25px;
      }
      .title
      {
         font-weight:bold;
         font-size:14px;
         padding:2px;
      }
      .SubTitle
      {
          margin-top:5px;
         padding-top:5px;
         font-weight:bold;
         font-size:14px; 
         border-top: 1px solid #ddd;
         border-left: 1px solid #ddd;
         border-right: 1px solid #ddd;
         height:23px;
         width:250px;
         text-align:left;
      }
      .QueryBody
      {
          margin-top:-1px;
          border:1px solid #ddd;
          padding:5px;
          width:80%;
       }
    </style>
</head>
<body>
    
    <div id="div">
    <%=QueryBody %>
    </div>
    <iframe id="ReportView" frameborder="no" marginwidth="0" marginheight="0" src="" scrolling="yes" width="100%" height="100%"></iframe>
   
    
</body>
</html>
